<?php 
$listSanPham=$this->listSanPham;
$pageNumber=$this->pageNumber;
$limit=$this->limit;
$page=$this->page;
?>
<input type="hidden" value="<?php echo $limit?>" id="limit"></input>
<div class="center_title_bar">Sản phẩm mới</div>
	<?php 
		Application_Model_util_CreateViewUtil::createViewListSanPham($listSanPham);
	?>
<div class="center_title_bar" id="phanTrang"><span class="pageText">Trang: </span>
	<?php 
	for ($index = 1; $index <= $pageNumber; $index++) {
		if($index==$page){
			echo '<div class="pageItemSelect" alt="'.$index.'">'.$index.'</div>';
		}else
		echo '<div class="pageItem" alt="'.$index.'">'.$index.'</div>';
	}
	?>
 </div>
 <script type="text/javascript">
 window.addEvent('domready',function(){
		//xu ly phan trang ajax
		var limit=$('limit').get('value');
		var idDanhMuc="";
		var log=$('logContent');
		
		$('phanTrang').getElements('div').addEvent('click',function(e){
			removeMyClass('phanTrang', 'div', 'pageItemSelect');
			addMyClass('phanTrang', 'div', 'pageItem');
			this.addClass('pageItemSelect');
			var page=this.get('alt');
			var data={
					lm: limit,
					pa: page,
					ten: '',
					maDM: idDanhMuc,
					g: 0,
					mcn: '',
					ajax: 'co'
					};
			var url=rootURL+'/sanpham/get-list';
			var sucessFT= function(){
				addCartRegist();
				bumpbox();
				};
			requestAdv(url,log,data,sucessFT);
		});
		
	 });
 </script>